package com.EAsystem.service;

import com.EAsystem.entity.HomeworkSubmission;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface HomeworkSubmissionService {
    
    // 添加作业提交
    boolean addHomeworkSubmission(HomeworkSubmission homeworkSubmission);
    
    // 更新作业提交
    boolean updateHomeworkSubmission(HomeworkSubmission homeworkSubmission);
    
    // 删除作业提交
    boolean deleteHomeworkSubmission(Long id);
    
    // 根据ID查询作业提交
    HomeworkSubmission getHomeworkSubmissionById(Long id);
    

    
    // 根据作业ID查询作业提交
    List<HomeworkSubmission> getHomeworkSubmissionsByHomeworkId(Long homeworkId);
    
    // 根据学生ID查询作业提交
    List<HomeworkSubmission> getHomeworkSubmissionsByStudentId(Long studentId);
    
    // 根据作业ID和学生ID查询作业提交
    HomeworkSubmission getHomeworkSubmissionByHomeworkIdAndStudentId(Long homeworkId, Long studentId);
    
    // 分页查询所有作业提交
    PageInfo<HomeworkSubmission> getAllHomeworkSubmissionsWithPage(int pageNum, int pageSize);
    
    // 条件查询作业提交
    PageInfo<HomeworkSubmission> getHomeworkSubmissionsByConditionWithPage(HomeworkSubmission homeworkSubmission, int pageNum, int pageSize);
    
    // 评分
    boolean gradeHomeworkSubmission(Long id, Double score);
}